
pkgname=xz
pkgver=5.2.4
pkgrel=1
pkgdesc='Library and command line tools for XZ and LZMA compressed files'
arch=('x86_64')
url='http://tukaani.org/xz/'
license=('GPL' 'LGPL' 'custom')
depends=('sh')
options=('!libtool')
source=("http://tukaani.org/xz/${pkgname}-${pkgver}.tar.xz")
md5sums=('003e4d0b1b1899fc6e3000b24feddf7c')

build() {
    cd ${pkgname}-${pkgver}

    ./configure --prefix=/usr \
        --disable-rpath \
        --enable-werror
    make
}

check() {
    cd ${pkgname}-${pkgver}
    
    make check
}

package() {
    cd ${pkgname}-${pkgver}
    make DESTDIR=${pkgdir} install
    
    install -d -m755 ${pkgdir}/usr/share/licenses/xz/
    ln -sf /usr/share/doc/xz/COPYING ${pkgdir}/usr/share/licenses/xz/
    ln -sf /usr/share/licenses/common/GPL2/license.txt ${pkgdir}/usr/share/doc/xz/COPYING.GPLv2
}

